package ooday05;

public class EnumDemo {
    public static void main(String[] args) {
        Season[] seasons=Season.values();
        for (int i = 0; i < seasons.length; i++) {
            System.out.println(seasons[i]);
            System.out.println(seasons[i].getSeasonName()+","+seasons[i].getSeasonDesc());
        }

        Season s=Season.valueOf("SPRING");
        System.out.println(s.getSeasonName()+","+s.getSeasonDesc());
        switch (s){
            case SPRING:
                System.out.println(s.getSeasonName()+"很"+ s.getSeasonDesc());
                break;
            case SUMMER:
                System.out.println(s.getSeasonName()+"很"+ s.getSeasonDesc());
                break;
            case AUTUMN:
                System.out.println(s.getSeasonName()+"很"+ s.getSeasonDesc());
                break;
            case WINTER:
                System.out.println(s.getSeasonName()+"很"+ s.getSeasonDesc());
                break;
        }

        /*Season s=Season.SPRING;
        Season s1=Season.SUMMER;
        Season s2=Season.AUTUMN;
        Season s3=Season.WINTER;
        System.out.println(s.getSeasonName()+""+s.getSeasonDesc());

         */
    }
}
